﻿@model IEnumerable<KhoaLuan.Areas.Admin.Models.ReportInfo>
<h2 style="color:red;">@ViewBag.Title</h2>
<div>
    <div class="col-md-4"></div>
    <div class="col-md-8">

        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript">
    google.load("visualization", "1", { packages: ["corechart"] });
    google.setOnLoadCallback(drawChart);
    function drawChart() {

        var data = google.visualization.arrayToDataTable([
          ['Nhóm', 'Giá trị'],
          @foreach (var r in Model)
          {
              <text>["@r.Group", @r.Count],</text>
          }
        ]);

        var options = {
            title: 'Kiểm Kê'
        };

        var chart = new google.visualization.PieChart(document.getElementById('piechart'));

        chart.draw(data, options);
    }
        </script>
        <div id="piechart" style="width: 900px; height: 500px;"></div>
    </div>
</div>




<table class="table table-hover">
    <tr>
        <th>Tên</th>
        <th>Tổng Số </th>
        <th>Doanh Số</th>
        <th>Thấp Nhât</th>
        <th>Lớn Nhất</th>
        <th>Trung Bình</th>
    </tr>
    @foreach (var r in Model)
    {
        <tr>
            <td>@r.Group</td>
            <td>@r.Sum</td>
            <td>@r.Count</td>
            <td>@r.Min</td>
            <td>@r.Max</td>
            <td>@r.Avg</td>
        </tr>
    }
</table>

